package com.adan.learning.service;

import com.adan.learning.model.dto.XcChooseCourseDto;
import com.adan.learning.model.dto.XcCourseTablesDto;
import com.adan.learning.model.po.XcCourseTables;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * @version: 1.0
 * @Author: adan
 * @description: 我的课程表service接口
 * @date: 2023-06-25 13:14
 */
public interface MyCourseTablesService extends IService<XcCourseTables> {

    /**
     * @description 添加选课
     * @param userId 用户id
     * @param courseId 课程id
     * @return com.xuecheng.learning.model.dto.XcChooseCourseDto
     * @author Mr.M
     * @date 2022/10/24 17:33
     */
    public XcChooseCourseDto addChooseCourse(String userId, Long courseId);

    /**
     * @description 判断学习资格
     * @param userId
     * @param courseId
     * @return XcCourseTablesDto 学习资格状态
     * [{"code":"702001","desc":"正常学习"},
     * {"code":"702002","desc":"没有选课或选课后没有支付"},
     * {"code":"702003","desc":"已过期需要申请续期或重新支付"}]
     * @author Mr.M
     * @date 2022/10/3 7:37
     */
    public XcCourseTablesDto getLearningStatus(String userId, Long courseId);
}
